package com.ce.pms.customer.dao;

import java.util.List;
import java.util.Set;

import com.ce.pms.base.dao.IPmsBaseDao;
import com.ce.pms.common.model.SysrefcodeDO;
import com.ce.pms.customer.model.ClientRHouseDO;
import com.ce.pms.customer.model.ParticipantDO;
import com.ce.pms.house.model.HouseDomain;

public interface IClientRHouseDao extends IPmsBaseDao<ClientRHouseDO> {
	/**
	 * Function:根据房屋id和参与人id及角色CODE查询相应的客户房屋关系实体
	 * @param
	 * @return
	 * Create author:xuhaidui
	 * Create on:2008-6-6
	 * Edit author:
	 * Edit on:
	 * Why:
	 */
	public ClientRHouseDO getClientRHouseByHouseAndParticipantId(Long houseId,Long participantId);
	/**
	 * 功能描述: 通过房屋id和产权id和客户类型value得到其对应的有效客户房屋关系实体 <br>
	 * @param houseId　房屋id
	 * @param proRightId　产权id
	 * @param clientType　客户类型value
	 * @return List<ClientRHouseDO>
	 * Create author: 胡煦<br>
	 * Create on:2008-10-14  <br>
	 * Edit author:  <br>
	 * Edit on:    <br>
	 * Why:     <br>
	 */
	public List<ClientRHouseDO> getClientRHouseListByHouseIdAndProRight(Long houseId,Long proRightId,String clientType);
	/**
	 * Function: 根据房间id找出其业主姓名,若有多个用,号隔开
	 * @param houseId
	 * @return String
	 * Create author:胡煦
	 * Create on:2008-9-9
	 * Edit author:
	 * Edit on:
	 * Why:
	 */
	public String getOwnerNameBy(Long houseId);
	/**
	 * Function:根据房屋id和客户id查询相应的客户房屋关系实体
	 * @param
	 * @return
	 * Create author:xuhaidui
	 * Create on:2008-6-6
	 * Edit author:
	 * Edit on:
	 * Why:
	 */
	public ClientRHouseDO getClientRHouseByHouseAndClient(Long houseId,Long clientId);

	/**
	 *
	 * 功能描述: 通过客户id得到客户房屋关系列表
	 *
	 * @author 付湘辉
	 * Created on:2008-6-11
	 *
	 * 修改原因：
	 * @param clientId
	 * @return List 返回结果
	 */
	public List<ClientRHouseDO> getClientRHouseListByClientId(Long clientId);

	/**
	 * 功能描述: 通过房屋id得到其对应的客户房屋关系列表 <br>
	 * @param houseId
	 * @return
	 *
	 * Create author: <br>
	 * Create on:2008-7-28  <br>
	 * Edit author:  <br>
	 * Edit on:    <br>
	 * Why:     <br>
	 */
	public List<ClientRHouseDO> getClientRHouseListByHouseId(Long houseId);

	/**
	 * 功能描述: 通过房屋id和客户类型id得到其对应的客户房屋关系列表 <br>
	 * @param houseId
	 * @return
	 *
	 * Create author: <br>
	 * Create on:2008-7-28  <br>
	 * Edit author:  <br>
	 * Edit on:    <br>
	 * Why:     <br>
	 */
	public List<ClientRHouseDO> getClientRHouseListByHouseIdAndClientType(Long houseId,Long clientTypeId);

	/**
	 * 功能描述: 通过房屋id列表和客户类型id得到其对应的客户房屋关系列表 <br>
	 * @param houseId
	 * @return
	 *
	 * Create author: <br>
	 * Create on:2008-7-28  <br>
	 * Edit author:  <br>
	 * Edit on:    <br>
	 * Why:     <br>
	 */
	public List<ClientRHouseDO> getClientRHouseListByHouseIdAndClientType(String houseIds,Long clientTypeId);
	/**
	 * 功能描述: 通过房屋id和产权id和客户类型id得到其对应的客户房屋关系列表 <br>
	 * @param houseId　房屋id
	 * @param proRightId　产权id
	 * @param clientTypeId　客户类型id
	 * @return
	 *
	 * Create author: <br>
	 * Create on:2008-7-28  <br>
	 * Edit author:  <br>
	 * Edit on:    <br>
	 * Why:     <br>
	 */
	public List<ClientRHouseDO> getClientRHouseListByHouseIdAndProRight(Long houseId,Long proRightId,Long clientTypeId);

	/**
	 * 功能描述: 取得一组房屋和给定客户类型的客户房屋关系列表 <br>
	 *@param houses
	 *@param cType
	 *@return
	 * @author Adama Yue
	 * @CreateDate:上午11:39:19
	 */
	public List<ClientRHouseDO> getByHousesAndClientType(Set<HouseDomain> houses,SysrefcodeDO cType);

	/**
	 * 功能描述: 根据房间id得到所有有效的业主实体 <br>
	 * @param houseId
	 * @return
	 *
	 * Create author:付湘辉 <br>
	 * Create on:2008-8-15  <br>
	 * Edit author:  <br>
	 * Edit on:    <br>
	 * Why:     <br>
	 */
	public List<ParticipantDO> getAllOwnerByHouseId(Long houseId);

	/**
	 * 功能描述: 根据房间id得到所有的业主实体 <br>
	 * @param houseId
	 * @return
	 *
	 * Create author:付湘辉 <br>
	 * Create on:2008-8-15  <br>
	 * Edit author:  <br>
	 * Edit on:    <br>
	 * Why:     <br>
	 */
	public List<ParticipantDO> getAllOwnerByHouseId(Long houseId,Long proRightId);

	/**
	 * 功能描述: 根据房间id得到所有的业主名称列表 <br>
	 * @param houseId
	 * @return
	 *
	 * Create author:付湘辉 <br>
	 * Create on:2008-8-15  <br>
	 * Edit author:  <br>
	 * Edit on:    <br>
	 * Why:     <br>
	 */
	public List<String> getAllOwnerNameByHouseId(Long houseId);
}
